<!--
  描述：产品组table页
  @author tanghongjun
  @since 2020-08-19 11:18:36
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--表格id与lay-filter属性一致，统一定义为zmn-table-->
<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <!--规定复选框列置于第1列，居中显示-->
        <th lay-data="{field:'sort', width:60, unresize:true, sort:true, align:'center', edit:'text', fixed:'left'}">
            排序
        </th>
        <th lay-data="{field:'id', width:80, unresize:true, align:'center'}">ID</th>
        <th lay-data="{field:'categName',unresize:true, width:200, align:'center'}">服务分类</th>
        <th lay-data="{field:'videoNumber', width:120, unresize:true, align:'center'}">视频数</th>
        <th lay-data="{field:'auditFlag', width:120, unresize:true, align:'center'}">后台审核</th>
        <th lay-data="{field:'requiredFlag', width:80, unresize:true, align:'center'}">必传</th>
        <th lay-data="{field:'videoSrc',width:80, unresize:true, align:'center'}">示例视频</th>
        <th lay-data="{field:'createrAndCreateTime', unresize:true, align:'center'}">创建人/创建时间</th>
        <th lay-data="{field:'updaterAndUpdateTime', unresize:true, align:'center'}">最近修改人/时间</th>
        <!--规定操作列置于最后-->
        <th lay-data="{field:'操作', width:120, unresize:true, align:'center', fixed:'right'}">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${items}">
        <td th:text="${item.sort}">sort</td>
        <td th:text="${item.videoId}">id</td>
        <td th:text="${item.categName}">categName</td>
        <td th:text="${item.videoNumber}">pictureNumber</td>
        <td>
            <div th:onmouseover="|show_tips(${(#authPermit.checkPermit('/channel/workorder/video/updateAuditFlag.action'))},'请先开启开关权限',this)|">
                <input th:disabled="${(#authPermit.checkPermit('/channel/workorder/video/updateAuditFlag.action'))?'false':'true'}"
                       type="checkbox" name="auditFlag" id="auditFlag" th:key="${item.videoId}"
                       th:value="${item.auditFlag}"
                       lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_audit_flag"
                       th:checked="${item.auditFlag == 2}"/>
            </div>
        </td>
        <td>
            <div th:onmouseover="|show_tips(${(#authPermit.checkPermit('/channel/workorder/video/updateRequiredFlag.action'))},'请先开启开关权限',this)|">
                <input th:disabled="${(#authPermit.checkPermit('/channel/workorder/video/updateRequiredFlag.action'))?'false':'true'}"
                       type="checkbox" name="requiredFlag" id="requiredFlag" th:key="${item.videoId}"
                       th:value="${item.requiredFlag}"
                       lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_required_flag"
                       th:checked="${item.requiredFlag == 2}"/>
            </div>
        </td>
        <td>
            <div th:if="${item.videoSrc != '' and item.videoSrc != null}">
                <a style="color: #00a0e9" href="#" th:id="${item.videoId}"
                   th:onclick="previewVideo([[${item.videoId}]],[[${item.videoSrc}]])" th:src="${item.videoSrc}">查看</a>
            </div>
        </td>
        <td th:text="${(item.creater != null ? item.creater+'/' : '')+T(com.zmn.common.utils.date.DateUtil).toString(item.createTime)}">
            createTime
        </td>
        <td th:text="${(item.updater != null ? item.updater+'/' : '')+T(com.zmn.common.utils.date.DateUtil).toString(item.updateTime)}">
            updateTime
        </td>
        <td>
            <div>
                <a th:if="${#authPermit.checkPermit('/channel/workorder/video/addEditView.action')}"
                   style="color: #00a0e9"
                   th:onclick="toEditWorkOrderVideo([[${item.channelId}]], [[${item.videoId}]])" href="#"
                   lay-text="修改" text="修改">修改</a>&nbsp;&nbsp;
                <a th:if="${#authPermit.checkPermit('/channel/workorder/video/delete.action')}" style="color: #00a0e9"
                   th:onclick="deleteWorkOrderVideo([[${item.videoId}]])" href="#"
                   lay-text="删除" text="删除">删除</a>
            </div>
        </td>
    </tr>
    </tbody>
</table>
